package com.situ.mall.web.controller;

import com.situ.mall.common.entity.Member;
import com.situ.mall.common.exception.NoLoginException;
import com.situ.mall.common.util.RequestUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/")
public class InformationController {
    @GetMapping("/information")
    public String page(){
        Object o = RequestUtil.getCurrent();//得到当前登录的用户
        Member m = (Member)o;
        if(o == null) {//没登陆
            throw new NoLoginException();
        }
        return "information";
    }
}
